[IA64] fix domain_flush_vtlb_all()
authorawilliam@xenbuild.aw <awilliam@xenbuild.aw>
Wed, 5 Jul 2006 16:03:20 +0000 (10:03 -0600)
committerawilliam@xenbuild.aw <awilliam@xenbuild.aw>
Wed, 5 Jul 2006 16:03:20 +0000 (10:03 -0600)
It should purge software tlb entry of specified vcpu, not current.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
xen/arch/ia64/xen/vcpu.c
xen/arch/ia64/xen/vhpt.c
xen/include/asm-ia64/tlbflush.h

index 227cd8cd72dec279a096af33ce8e3e2b94137336..d820c7faf6618ab117a08688c6ddb75e193784fa 100644 (file)
@@ -2065,7 +2065,7 @@ IA64FAULT vcpu_ptc_e(VCPU *vcpu, UINT64 vadr)
        // architected loop to purge the entire TLB, should use
        //  base = stride1 = stride2 = 0, count0 = count 1 = 1
 
-       vcpu_flush_vtlb_all ();
+       vcpu_flush_vtlb_all(current);
 
        return IA64_NO_FAULT;
 }
index 895e8bc0fe183d9af50e17cef4a4bfdeed1eb656..cbd40e4abfbb85122f77e42fc4d24aa0605f920e 100644 (file)
@@ -129,10 +129,8 @@ void vhpt_init(void)
 }
 
 
-void vcpu_flush_vtlb_all (void)
+void vcpu_flush_vtlb_all(struct vcpu *v)
 {
-       struct vcpu *v = current;
-
        /* First VCPU tlb.  */
        vcpu_purge_tr_entry(&PSCBX(v,dtlb));
        vcpu_purge_tr_entry(&PSCBX(v,itlb));
@@ -148,6 +146,11 @@ void vcpu_flush_vtlb_all (void)
           check this.  */
 }
 
+static void __vcpu_flush_vtlb_all(void *vcpu)
+{
+       vcpu_flush_vtlb_all((struct vcpu*)vcpu);
+}
+
 void domain_flush_vtlb_all (void)
 {
        int cpu = smp_processor_id ();
@@ -158,12 +161,11 @@ void domain_flush_vtlb_all (void)
                        continue;
 
                if (v->processor == cpu)
-                       vcpu_flush_vtlb_all ();
+                       vcpu_flush_vtlb_all(v);
                else
-                       smp_call_function_single
-                               (v->processor,
-                                (void(*)(void *))vcpu_flush_vtlb_all,
-                                NULL,1,1);
+                       smp_call_function_single(v->processor,
+                                                __vcpu_flush_vtlb_all,
+                                                v, 1, 1);
        }
 }
 
index eafdf0b9d76d9d63e6673ddce018080d037c57e3..a0babd8d6599538ac705108d1e6c7818a98a4852 100644 (file)
@@ -11,7 +11,7 @@
 */
 
 /* Local all flush of vTLB.  */
-void vcpu_flush_vtlb_all (void);
+void vcpu_flush_vtlb_all(struct vcpu *v);
 
 /* Local range flush of machine TLB only (not full VCPU virtual TLB!!!)  */
 void vcpu_flush_tlb_vhpt_range (u64 vadr, u64 log_range);